Integrand size = 27, antiderivative size = 83 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {3 a x}{2}-\frac {b \text {arctanh}(\cos (c+d x))}{d}+\frac {b \cos (c+d x)}{d}+\frac {b \cos ^3(c+d x)}{3 d}-\frac {3 a \cot (c+d x)}{2 d}+\frac {a \cos ^2(c+d x) \cot (c+d x)}{2 d} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {2917, 2671, 294, 327, 209, 2672, 308, 212} \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {3 a \cot (c+d x)}{2 d}+\frac {a \cos ^2(c+d x) \cot (c+d x)}{2 d}-\frac {3 a x}{2}-\frac {b \text {arctanh}(\cos (c+d x))}{d}+\frac {b \cos ^3(c+d x)}{3 d}+\frac {b \cos (c+d x)}{d} \]
[In]
[Out]
Rule 209
Rule 212
Rule 294
Rule 308
Rule 327
Rule 2671
Rule 2672
Rule 2917
Rubi steps \begin{align*} \text {integral}& = a \int \cos ^2(c+d x) \cot ^2(c+d x) \, dx+b \int \cos ^3(c+d x) \cot (c+d x) \, dx \\ & = -\frac {a \text {Subst}\left (\int \frac {x^4}{\left (1+x^2\right )^2} \, dx,x,\cot (c+d x)\right )}{d}-\frac {b \text {Subst}\left (\int \frac {x^4}{1-x^2} \, dx,x,\cos (c+d x)\right )}{d} \\ & = \frac {a \cos ^2(c+d x) \cot (c+d x)}{2 d}-\frac {(3 a) \text {Subst}\left (\int \frac {x^2}{1+x^2} \, dx,x,\cot (c+d x)\right )}{2 d}-\frac {b \text {Subst}\left (\int \left (-1-x^2+\frac {1}{1-x^2}\right ) \, dx,x,\cos (c+d x)\right )}{d} \\ & = \frac {b \cos (c+d x)}{d}+\frac {b \cos ^3(c+d x)}{3 d}-\frac {3 a \cot (c+d x)}{2 d}+\frac {a \cos ^2(c+d x) \cot (c+d x)}{2 d}+\frac {(3 a) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\cot (c+d x)\right )}{2 d}-\frac {b \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (c+d x)\right )}{d} \\ & = -\frac {3 a x}{2}-\frac {b \text {arctanh}(\cos (c+d x))}{d}+\frac {b \cos (c+d x)}{d}+\frac {b \cos ^3(c+d x)}{3 d}-\frac {3 a \cot (c+d x)}{2 d}+\frac {a \cos ^2(c+d x) \cot (c+d x)}{2 d} \\ \end{align*}
Time = 0.34 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.27 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {3 a (c+d x)}{2 d}+\frac {5 b \cos (c+d x)}{4 d}+\frac {b \cos (3 (c+d x))}{12 d}-\frac {a \cot (c+d x)}{d}-\frac {b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}-\frac {a \sin (2 (c+d x))}{4 d} \]
[In]
[Out]
Time = 0.39 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.06
method | result | size |
parallelrisch | \(\frac {48 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b -27 \left (\cos \left (d x +c \right )-\frac {\cos \left (3 d x +3 c \right )}{9}\right ) \sec \left (\frac {d x}{2}+\frac {c}{2}\right ) a \csc \left (\frac {d x}{2}+\frac {c}{2}\right )-72 a x d +60 b \cos \left (d x +c \right )+4 b \cos \left (3 d x +3 c \right )+64 b}{48 d}\) | \(88\) |
derivativedivides | \(\frac {a \left (-\frac {\cos ^{5}\left (d x +c \right )}{\sin \left (d x +c \right )}-\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+b \left (\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )}{d}\) | \(94\) |
default | \(\frac {a \left (-\frac {\cos ^{5}\left (d x +c \right )}{\sin \left (d x +c \right )}-\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+b \left (\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{3}+\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )}{d}\) | \(94\) |
risch | \(-\frac {3 a x}{2}+\frac {i a \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {5 b \,{\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {5 b \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d}-\frac {i a \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}-\frac {2 i a}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}+\frac {b \cos \left (3 d x +3 c \right )}{12 d}\) | \(138\) |
norman | \(\frac {\frac {4 b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {a}{2 d}-\frac {2 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {3 a x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}-\frac {9 a x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {9 a x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {3 a x \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {8 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(209\) |
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.29 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {3 \, a \cos \left (d x + c\right )^{3} - 3 \, b \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 3 \, b \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 9 \, a \cos \left (d x + c\right ) + {\left (2 \, b \cos \left (d x + c\right )^{3} - 9 \, a d x + 6 \, b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{6 \, d \sin \left (d x + c\right )} \]
[In]
[Out]
\[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x)) \, dx=\int \left (a + b \sin {\left (c + d x \right )}\right ) \cos ^{4}{\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.10 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {3 \, {\left (3 \, d x + 3 \, c + \frac {3 \, \tan \left (d x + c\right )^{2} + 2}{\tan \left (d x + c\right )^{3} + \tan \left (d x + c\right )}\right )} a - {\left (2 \, \cos \left (d x + c\right )^{3} + 6 \, \cos \left (d x + c\right ) - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} b}{6 \, d} \]
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.71 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x)) \, dx=-\frac {9 \, {\left (d x + c\right )} a - 6 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {3 \, {\left (2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} - \frac {2 \, {\left (3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 12 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 8 \, b\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
[In]
[Out]
Time = 11.01 (sec) , antiderivative size = 241, normalized size of antiderivative = 2.90 \[ \int \cos ^2(c+d x) \cot ^2(c+d x) (a+b \sin (c+d x)) \, dx=\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+8\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+8\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-5\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {16\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}-a}{d\,\left (2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}+\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}+\frac {b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {3\,a\,\mathrm {atan}\left (\frac {9\,a^2}{9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2+6\,b\,a}-\frac {6\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2+6\,b\,a}\right )}{d} \]
[In]
[Out]